home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2006 October / wn148cd2.iso / Windows / Travailler / QuickZip / quickzip_460013.exe / {app} / Scripts / File / Akp Batch Zip.akp < prev    next >
Text File  |  2005-05-26  |  569b  |  23 lines

  1. var i : integer;
  2.     fn : string;
  3. function RemoveSlash(Input: string): string;
  4. begin
  5.   if Input <> '' then
  6.     if Input[Length(Input)] = '\' then
  7.       Result := Copy(Input, 0, Length(Input) - 1)
  8.     else
  9.       Result := Input;
  10. end;
  11.  
  12. begin
  13.   for i := 0 to Param.count -1 do
  14.     begin
  15.       if pos('*',Param.strings[i]) <> 0 then
  16.         fn := RemoveSlash(ExtractFilePath(Param.strings[i])) + '.zip' else
  17.         fn := ChangeFileExt(Param.strings[i],'.zip');
  18.       New(fn);
  19.       Writeln(fn);
  20.       Add(Param.strings[i]);
  21.       DoAdd;
  22.     end;
  23. end.